//package com.yytek.nmp.api.factory;
//
//
//import com.yytek.common.core.domain.R;
//import com.yytek.nmp.api.RemoteNmpService;
//import com.yytek.nmp.api.domain.IotDeviceInfo;
//import org.slf4j.Logger;
//import org.slf4j.LoggerFactory;
//import org.springframework.cloud.openfeign.FallbackFactory;
//import org.springframework.stereotype.Component;
//
//import java.util.List;
//
//
//@Component
//public class RemoteNmpFallbackFactory implements FallbackFactory<RemoteNmpService> {
//
//    private static final Logger log = LoggerFactory.getLogger(RemoteNmpFallbackFactory.class);
//
//    @Override
//    public RemoteNmpService create(Throwable throwable) {
//        log.error("Nmp服务调用失败:{}", throwable.getMessage());
//        return new RemoteNmpService()
//        {
//            @Override
//            public R<?> getDeviceCache(String id) {
//                return R.fail("查询设备相关缓存信息失败:{}", throwable.getMessage());
//            }
//
//            @Override
//            public R<List<IotDeviceInfo>> selectDeviceInfoList(IotDeviceInfo devcie) {
//               return null;
//            }
//
//        };
//    }
//}
